<template>
  <van-tabbar
    route
    id="bar"
    v-model="active"
    inactive-color="#000"
    active-color="#136ab7"
  >
    <van-tabbar-item id="bar_icon" replace to="/index"
      ><span class="iconfont">&#xe64e;</span><span>首页</span></van-tabbar-item
    >
    <van-tabbar-item id="bar_icon" replace to="/car"
      ><span class="iconfont">&#xe73f;</span
      ><span>信用卡</span></van-tabbar-item
    >
    <van-tabbar-item id="bar_icon" replace to="/money"
      ><span class="iconfont">&#xe714;</span>投资理财<span></span
    ></van-tabbar-item>
    <van-tabbar-item id="bar_icon" replace to="/life"
      ><span class="iconfont">&#xe627;</span><span>生活</span></van-tabbar-item
    >
    <van-tabbar-item id="bar_icon" replace to="/my"
      ><span class="iconfont">&#xe613;</span><span>我的</span></van-tabbar-item
    >
  </van-tabbar>
</template>

<script>
export default {
  data() {
    return {
      active: 0,
    };
  },
};
</script>

<style lang="scss">
/*iconfont 图标*/
@font-face {
  font-family: "iconfont";
  src: url("../assets/iconfont/iconfont.woff2?t=1664011341460") format("woff2"),
    url("../assets/iconfont/iconfont.woff2?t=1664011341460") format("woff"),
    url("../assets/iconfont/iconfont.woff2?t=1664011341460") format("truetype");
}
.iconfont {
  font-family: "iconfont" !important;
  font-size: 0.2rem;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#bar {
  width: 100%;
  margin: 0 auto;
  height: 0.7rem;
  position: fixed;
  bottom: 0;
  left: 0;
  border-top: 0.01rem solid #eee;
  background-color: #ffffff;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  font-family: "黑体";
  font-weight: 900;
  #bar_icon {
    width: 0.7rem;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: space-around;
    span {
      display: block;
    }
  }
}
#bar #bar_icon .iconfont {
  font-size: .27rem;
  font-weight: 100;
}
</style>